package com.cn.Utils;

import java.util.concurrent.TimeUnit;

/**
 * @author he_ls
 * @since 2024/11/1 17:51
 **/
public class SleepHelper {
    public void sleepSeconds2(int n) {
        try {
            Thread.sleep(n * 1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }

    public static void sleepSeconds(int seconds) {
        try {
            TimeUnit.SECONDS.sleep(seconds);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
